<%@include file="../init.jspf" %>

<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="f" %>
<%@taglib uri="http://java.sun.com/portlet_2_0" prefix="portlet" %>
<%@taglib prefix='fn' uri='http://java.sun.com/jsp/jstl/functions' %>
<%@taglib prefix="spring" uri="http://www.springframework.org/tags" %>
<%@taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<%@taglib prefix="aui" uri="http://alloy.liferay.com/tld/aui" %>

<div>

    <portlet:actionURL var="unsetusernameActionUrl" name="username_unset_action">
        <portlet:param name="action" value="username_unset_action"/>
    </portlet:actionURL>

    <div class="levelUpOption">
        <a href="${unsetusernameActionUrl}"><spring:message code="ChangeUser"/></a>
    </div>

    <h4><spring:message code="title"/> <span class="highInTitle"><c:out value="${username}"/></span></h4>

    <table class="userExamsOverviewTable">
        <tr>
            <th><spring:message code="table.subject"/></th>
            <th><spring:message code="table.date"/></th>
            <th><spring:message code="table.time"/></th>
            <th><spring:message code="table.daysleft"/></th>
        </tr>

        <c:forEach var="subject" items="${subjects}">

            <portlet:actionURL var="URL">
                <portlet:param name="subjectId" value="${subject.subjectCode}"/>
                <portlet:param name="action" value="showSubjectDetail"/>
            </portlet:actionURL>

            <tr>
                <td><a href="${URL}">${subject.subjectCode}</a></td>
                <td>${subject.localDate}</td>
                <td>${subject.localTime}</td>
                <td>${subject.dayLeft}</td>
            </tr>
        </c:forEach>
    </table>
</div>